﻿#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QDebug>
#include <QSplitter>
#include <QTreeWidget>
#include <QMessageBox>
#include <QToolBar>
#include "ui/dashboardform.h"
#include "ui/roleform.h"
#include "ui/userform.h"
#include "ui/menuform.h"
#include <QLabel>
#include <QDateTime>
#include <QTimer>
#include <QProcess>
#include "appsettings.h"
#include <QtSql/QSqlDatabase>
#include <QtSql/QSqlQuery>
#include <QSqlError>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private:
    void initUi();

    void initAction();
    void initMenuBar();
    void initToolBar();
    void initConnect();
    void initStatusBar();

private:
    Ui::MainWindow *ui;
    QSplitter *m_pSplitter;
    QTreeWidget *m_pTreeWidget;
    DashboardForm *m_pDashboardForm = nullptr;
    RoleForm *m_pRoleForm = nullptr;
    UserForm *m_pUserForm = nullptr;
    MenuForm *m_pMenuForm = nullptr;

    QAction *m_pSysInfoAction;
    QAction *m_pMaxAction;
    QAction *m_pMinAction;
    QAction *m_pNormalAction;
    QAction *m_pExitAction;
    QAction *m_pReloginAction;

    QAction *m_pRoleAction;
    QAction *m_pUserAction;
    QAction *m_pMenuAction;

    QAction *m_pAboutAction;

    QMenu *m_pSystemMenu;
    QMenu *m_pBasicMenu;
    QMenu *m_pHelpMenu;

    QToolBar *m_pSysToolBar;
    QToolBar *m_pBaseToolBar;

    QLabel *m_pCurrentTimeLabel;
    QTimer *m_pTimer;

private slots:

};
#endif // MAINWINDOW_H
